Server_Client = false;
ace_sys_network_WeatherSync_Disabled = true;
HAMM_obj_placing = 0;

waitUntil { ( (time > 1) and ((alive player) or (isServer)) ) };
if (isServer) then {
	if (!(isNull player)) then {Server_Client = true;};
};
_h = [] execVM "defineVars.sqf";
waitUntil{scriptDone _h};

if ((!isServer) or (Server_Client)) then 
{
	["kamera"] execVM "introCam.sqf";
	["texte"]  execVM "introCam.sqf";
};

_h = [] execVM "handler_functions.sqf";
waitUntil{scriptDone _h};

_h = [32, rolenumber] execVM "functions_public.sqf";
waitUntil{scriptDone _h};

if (isServer) then
{
	if (isNil "serverKontoArray") then
	{
		serverKontoArray = [];
	};
	
	if (isNil "serverSavedArray") then
	{
		serverSavedArray = [];
	};
	
	_h = [] execVM "\serverLoad.sqf";
	_h = [] execVM "\server_funcs.sqf";
	[] execVM "\NSPD_Shop_System.sqf";
	[0,0,0,["server"]] execVM "DrugDealerJob.sqf";
};

sleep 2;

if ((!isServer) or (Server_Client)) then 
{[]execVM "loadStats.sqf";};

_h = [] execVM "handler_goodsbuysell.sqf";
waitUntil{scriptDone _h};

pulledout = [];
"pulledout" addPublicVariableEventhandler { if(player == (_this select 1)) then { execVM "pulledout.sqf";}; };

sleep 5;
if (isServer) then 
{	
	[ENV_SkipTimeDay, SkipTimeNight, 1]execVM "\scripts\time.sqf";
	[]execVM "scripts\weathergen2.sqf";
	[]execVM "dealer.sqf";
	["serverloop1"]execVM "loopChecks.sqf";
	[]execVM "convoy.sqf";
	[1]execVM "markers.sqf";
	[0, 0, 0, ["serverloop"]]execVM "guildsTerrorMisc.sqf";
	[0, 0, 0, ["serverloop"]]execVM "mayor.sqf";
	[]execVM "\scripts\thirty_min_server_loop.sqf";
	[]execVM "\scripts\race.sqf";
	["serverloop"] execVM "placeObj.sqf";
	["init"]execVM "roadblock.sqf";
	[0,0,0,["serverloop"]] execVM "taxiJob.sqf";
	"TaxationServerStart" addPublicVariableEventhandler {(_this select 1) spawn FinalTaxToServer;};
	[]execVM "\scripts\serverNewsArray.sqf";
};

if ((!isServer) or (Server_Client)) then 
{
	//[]execVM "saveVehicles.sqf";
	player addEventHandler ["killed", {_this execVM "killedScript.sqf"}];
	player addEventHandler ["fired",  {["fired", (_this select 4)] execVM "stun.sqf" }];
	["clientloop"] execVM "saveObjVeh.sqf";
	[]execVM "setGraphics.sqf";						
	[]execVM "weather\weatherrec2.sqf";
	[]execVM "weather\weather_clientloop.sqf";
	[]execVM "unitgear.sqf";
	[]execVM "respawn.sqf";
	[2]execVM "markers.sqf";
	[3]execVM "markers.sqf";
	[]execVM "loopActions.sqf";
	[0, 0, 0, ["clientloop"]] execVM "guildsTerrorMisc.sqf";
	[]execVM "terrorist_shop.sqf";
	["clientloop2"]execVM "loopChecks.sqf";
	[]execVM "animList.sqf";
	[]execVM "atmBankActions.sqf";
	[]execVM "someTrigger.sqf";
	[]execVM "someTrigger2.sqf";
	[]execVM "lottoFlagActions.sqf";
	[]execVM "refuelActions.sqf";
	[]execVM "addJobApplyActions.sqf";
	[]execVM "avgasrefuel_action.sqf";
	[]execVM "flagActions.sqf";
	[]execVM "salaries.sqf";
	sleep 3;
	if (iscop) then {
		for [{_i=1}, {_i <= copscount}, {_i=_i+1}] do {
			call compile format ["actionstrassensperre%1 = strassensperre%1 addaction [localize ""STRS_addaction_removesperre"", ""someCompile.sqf"", [""strassensperre%1 setpos [0, 0, 0];""] ];", _i];
		};
	};
};
